package com.by.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @author LittleDesire
 * @description
 * @date 2022-03-21 周一 18:01
 * @since 17
 */
@Configuration
public class SpringConfig {
    @Bean
    public Date date() {
        return new Date();
    }

    @Bean
    public SimpleDateFormat sdf() {
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        return sdf;
    }
}
